﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace FakeXiecheng.API.Models
{
    public class TouristRoute
    {
        [Key]
        public Guid Id { get; set; }
        [Required]
        [MaxLength(100)]
        public string Title { get; set; }//路线名字
        [Required]
        [MaxLength(1500)]
        public string Description { get; set; }//路线简介
        [Column(TypeName = "decimal(18,2)")]
        public decimal Originalprice { get; set; }//原价
        [Range(0.0,1.0)]
        public double? DiscountPresent { get; set; }//百分比折扣
        public DateTime CreateTime { get; set; }//发布时间
        public DateTime? UpdateTime { get; set; }//更新时间
        public DateTime? DepartureTime { get; set; }//出发时间
        [MaxLength]
        public string Features { get; set; }//卖点介绍
        [MaxLength]
        public string Fees { get; set; }//费用
        [MaxLength]
        public string Notes { get; set; }//说明
        public ICollection<TouristRoutePicture> TouristRoutePictures { get; set; }
        = new List<TouristRoutePicture>();//避免其他的错误，让代码更健壮
        public double? Rating { get; set; }//评价
        public TravelDays? TravelDays { get; set; }//旅行日期
        public TripType? TripType { get; set; }   //旅行类型
        public DepartureCity? DepartureCity { get; set; }   //出发城市
    }
}
